#!/bin/perl -w

use File::Sepc;

my ($install_root)=@ARV;
defined($install_root) or ($install_root=".");
$install_root=File::Spec->rel2abs($install_root);

( -e "$install_root/hyup.pl" ) and (-e "$install_root/hyrepo.conf") or die "Cannot find neccessary installation files, dying...\n";

# List of files to be installed
my %install_list_unix={
    "hyup.pl"=>"/usr/lib/hygit/",
    "hyrepo.conf"=>"/etc/"
};

# Copy files to destination.
foreach my $k ( keys( %install_list_unix)){
    system ( "cp $install_root/$k $install_list_unix[$k]$k");
}
